import request from '@/utils/request'

// 查询客户分摊列表
export function listApportionment(query) {
  return request({
    url: '/apportionment/apportionment/list',
    method: 'get',
    params: query
  })
}

// 查询客户分摊详细
export function getApportionment(id) {
  return request({
    url: '/apportionment/apportionment/' + id,
    method: 'get'
  })
}

// 新增客户分摊
export function addApportionment(data) {
  return request({
    url: '/apportionment/apportionment',
    method: 'post',
    data: data
  })
}

// 修改客户分摊
export function updateApportionment(data) {
  return request({
    url: '/apportionment/apportionment',
    method: 'put',
    data: data
  })
}

// 删除客户分摊
export function delApportionment(id) {
  return request({
    url: '/apportionment/apportionment/' + id,
    method: 'delete'
  })
}

// 导出客户分摊
export function exportApportionment(query) {
  return request({
    url: '/apportionment/apportionment/export',
    method: 'get',
    params: query
  })
}